package com.yanxi.controller;


import com.yanxi.pojo.OperateLog;
import com.yanxi.pojo.PageResult;
import com.yanxi.pojo.Result;
import com.yanxi.service.LogService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LogController {
    public static final Logger log = LoggerFactory.getLogger(LogController .class);

    @Autowired
    private LogService logService;

    @GetMapping("/log/page")
    public Result page(Integer page, Integer pageSize) {
        log.info("分页查询，参数：{},{}", page, pageSize);
        PageResult<OperateLog> PageResult = logService.page(page, pageSize);

        return Result.success(PageResult);
    }
}
